/**
 * 存储用户信息的模块
 */

var allUsers = [{
	name: "huang",
	pass: "123456"
}, {
	name:"tang",
	pass:"123456"
},{
	name:"chen",
	pass:"123456"
}];

// 校验用户名和密码是否正确
exports.match = function(userName, userPass) {
	// 使用数组的some函数判断用户名和密码是否同时正确
	return allUsers.some(function(item,index,arr){
		return item.name == userName && item.pass == userPass;
	});
}
